package com.hoshiicloud.common.constant.enumeration;

public enum TradeStatus {
    NOTPAY(0),
    SUCCESS(1),
    CLOSED(2),
    FINISHED(3),
    REFUND(4),
    PROCESSING(5),
    PAYERROR(-1);
    private int status;
    private TradeStatus(int status){
        this.status=status;
    }
    public int getStatus(){
        return this.status;
    }
    public static TradeStatus getByStatus(int status) {
        for (TradeStatus aparameterStatus : values()) {
            if (aparameterStatus.getStatus() == status) {
                return aparameterStatus;
            }
        }
        return null;
    }
}
